-
Notifications
You must be signed in to change notification settings - Fork 637
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(backend): upgrade sqlx to ^0.7 #1865
Conversation
how it was testeddiff --git a/docker-compose.yml b/docker-compose.yml
index 7c01c244..88ca7669 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -9,8 +9,8 @@ services:
restart: unless-stopped
volumes:
- db_data:/var/lib/postgresql/data
- expose:
- - 5432
+ ports:
+ - 5432:5432
environment:
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_DB: windmill docker compose up db cargo install --version ^0.7 sqlx-cli
export DATABASE_URL=postgres://postgres:changeme@localhost/windmill?sslmode=disable
cd ./backend
sqlx migrate run cd ../frontend
npm ci
npm run generate-backend-client
npm run build cd ../backend
# just in case
cargo sqlx prepare --workspace -- --all-features
# as per backend/README.md
cargo sqlx prepare --workspace -- --bin windmill --features enterprise
cargo run |
This comment was marked as resolved.
This comment was marked as resolved.
…ectly ref: https://github.com/launchbadge/sqlx/blob/afb6b1066e61f8e3875f530d96cfb5a299f13fda/examples/postgres/transaction/src/main.rs#L14-L17 notice that I'm temporarly using my custom patch mrl5/sqlx@16e4c9a it's related to launchbadge/sqlx#2611
`cargo install sqlx-cli && sqlx migrate run`. This will also avoid compile | ||
time issue with sqlx's `query!` macro | ||
Postgres setup. The easiest way to get a working postgres is running `cargo | ||
install --version ^0.7 sqlx-cli && sqlx migrate run`. This will also avoid |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rubenfiszel using sqlx-cli
version (in terminal) that's in sync with sqlx
version (in windmills Cargo.lock
) is probably the most important take away for this PR.
On the other hand I think above is only relevant for contributors that need to run this
Lines 18 to 22 in aaaf85a
### Compile sqlx for offline ci | |
``` | |
cargo sqlx prepare --merged -- --bin windmill --features enterprise | |
``` |
related to #1858
known
sqlx
0.7 breaking changes:&mut Transaction<'_, Sqlite>: Executor<'_>
is not satisfied launchbadge/sqlx#2606blocked by:upstream fix available in
0.7.1
via launchbadge/sqlx#2619